[mirrors]
http://nmap.org/dist/nmap-7.12.tar.bz2

[vars]
filesize=8960599
sha512=91156499c6f903fb565fa2b0faa74043d078493312f9489071fafc687301017afc16c7eb26c092f1fa142e78c98a436833f56a9f015cb2a17aa6f6220b6a0b98

[deps]
libpcap
pcre
zlib
lua
libressl

[deps.host]
dynamic-toolchain

[build]
patch -p1 < "$K"/nmap-configure-pcap_suitable.patch
patch -p1 < "$K"/nmap-nbase_h.patch

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE $optcflags" \
CXXFLAGS="-DIPPROTO_MAX=256 $CFLAGS" \
LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
    --without-subversion --without-nmap-update --without-zenmap \
    --without-ndiff \
    ac_cv_working_getaddrinfo=yes ac_cv_working_getnameinfo=yes

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install STRIP=true
